<!-- include tpl=head -->
<script type="text/javascript">
$(document).ready(function(){
	$("#{$ext_module}").submit(function(){
		$(this).ajaxSubmit({
			'url':"{url ctrl=project func=content_save/}",
			'type':'post',
			'dataType':'json',
			'success':function(rs){
				if(rs.status == 'ok'){
					$.dialog.alert("{lang数据保存成功}",function(){$.phpok.reload();},'succeed');
				}else{
					$.dialog.alert(rs.content);
				}
			}
		});
		return false;
	});
});
</script>
<div class="tips">
	{lang您当前的位置：}
	<a href="{echo admin_url('project')}">{lang项目管理}</a>
	&raquo; {lang项目内容编辑及字段扩展}
</div>

<form method="post" id="{$ext_module}">
<input type="hidden" id="id" name="id" value="{$id}" />
<div class="table">
	<div class="title">
		{lang名称：}
		<span class="note">{lang设置名称，该名称将在网站前台导航中使用}</span>
	</div>
	<div class="content"><input type="text" id="title" name="title" class="long" value="{$rs.title}" /></div>
</div>

<!-- loop from=$extlist key=$key value=$value -->
<div class="table">
	<div class="title">
		<table cellspacing="0" cellpadding="0">
		<tr>
			<td height="25">{$value.title}<span class="darkblue">[{$value.identifier}]</span>：</td>
			<td><span class="note">{$value.note}</span></td>
			<td><a class="icon edit" onclick="ext_edit('{$value.identifier}','{$ext_module}')"></a></td>
			<td><a class="icon delete" onclick="ext_delete('{$value.identifier}','{$ext_module}','{$value.title}')"></a></td>
		</tr>
		</table>
	</div>
	<div class="content">{$value.html}</div>
</div>
<!-- /loop -->


<div class="table">
	<div class="content">
		<span id="_quick_insert"></span>
		<script type="text/javascript">
		$(document).ready(function(){
			$.ajax({
				'url':"{url ctrl=ext func=select type=project module=$ext_module/}",
				'dataType':'html',
				'cache':false,
				'async':true,
				'beforeSend': function (XMLHttpRequest){
					XMLHttpRequest.setRequestHeader("request_type","html");
				},
				'success':function(rs){
					$("#_quick_insert").html(rs);
				}
			});
		});
		</script>
		<input type="button" value="{lang标准创建扩展字段}" onclick="ext_add('{$ext_module}')" class="button2" />
	</div>
</div>



<div class="table">
	<div class="content">
		<br />
		<input type="submit" value="{lang提交}" class="submit2" />
		<br />
	</div>
</div>
</form>
<!-- include tpl=foot -->